<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>ip管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/rsa/ips/list">ip列表</a></li>
		<shiro:hasPermission name="rsa:ips:save"><li><a href="${ctx}/rsa/ips/openSave">ip添加</a></li></shiro:hasPermission>
	</ul>
	<form:form id="searchForm" modelAttribute="ips" action="${ctx}/rsa/ips/" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<ul class="ul-form">
			<li><label>ip：</label>
				<form:input path="ip" htmlEscape="false" maxlength="30" class="input-medium"/>
			</li>
			<li class="btns">
				<a id="btnSubmit" class="btn btn-primary" onclick="return page();"><i class="icon-search"></i>&nbsp;查询</a>
			</li>
		</ul>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>ip</th>
				<th>录入时间</th>
				<th>删除标识</th>
				<th>更新时间</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody>
		<c:choose>
			<c:when test="${not empty page.list}">
				<c:forEach items="${page.list}" var="ips">
					<tr>
						<td><a href="${ctx}/rsa/ips/openUpdate?id=${ips.id}">
							${ips.ip}
						</a></td>
						<td>
							<fmt:formatDate value="${ips.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
						</td>
						<td>
							${fns:getDictLabel(ips.delFlag, 'del_flag', '')}
						</td>
						<td>
							<fmt:formatDate value="${ips.updateDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
						</td>
						<td>
							<shiro:hasPermission name="rsa:ips:update">
							<a title="编辑" href="${ctx}/rsa/ips/openUpdate?id=${ips.id}" class="btn-link"><i class="icon-pencil"></i></a>&nbsp;</a>
							</shiro:hasPermission>
							<shiro:hasPermission name="rsa:ips:delete">
							<a title="删除" href="${ctx}/rsa/ips/delete?id=${ips.id}" onclick="return confirmx('确认要删除该ip吗？', this.href)" class="btn-link"><i class="icon-trash"></i></a>
							</shiro:hasPermission>
						</td>
					</tr>
				</c:forEach>
			</c:when>
			<c:otherwise>
				<tr>
					<td colspan="8" style="text-align: center;font-size:17px; font-family:SimHei">未查询到数据...</td>
				</tr>
			</c:otherwise>
			</c:choose>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>